package com.spring.hx.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.spring.hx.entity.User;
import com.spring.hx.service.UserService;

@RestController
public class UserController {
	
	@Autowired
	UserService userService;

	@GetMapping(value = "/user/{id}")
	@ResponseBody
	public User getId(@PathVariable(value = "id") long id) {
		
		return userService.getId(id);
	}
}
